package co.fitstart.api.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.demo2do.core.persistence.GenericDaoSupport;

import co.fitstart.entity.coach.PrincipalReportRelation;

/**
 * 
 * @author dan
 *
 */
@Repository("principalDaoSupport")
public class PrincipalDaoSupport {
    
    @Autowired
    private GenericDaoSupport genericDaoSupport;
    
    /**
     * 
     * @return
     */
    @SuppressWarnings("unchecked")
    public List<PrincipalReportRelation> listSiteManager() {
        String sentence = "FROM PrincipalReportRelation WHERE coach IS NULL AND manager IS NOT NULL AND site IS NOT NULL";
        return genericDaoSupport.searchForList(sentence);
    }

}
